package com.example.androidlearning2200;

import androidx.appcompat.app.AppCompatActivity;

import android.net.Uri;
import android.os.Bundle;

public class CustomVideoActivity extends AppCompatActivity {

    private CustomVideoView cvv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_custom_video);
        cvv = findViewById(R.id.cvv);
        Uri uri = Uri.parse("android.resource://com.example.androidlearning2200/" + R.raw.big_buck_bunny);
        cvv.setVideoUri(uri);
    }

    @Override
    protected void onStop() {
        super.onStop();
        cvv.destroy();
    }
}